import { ReqPage } from '@/api/interface'

// 用户管理模块
export namespace User {
  export interface Query extends ReqPage {
    areaId?: string
    deptId?: string
    username?: string
    nickname?: string
    phone?: string
    roles?: string[]
    groups?: number
    type?: string
  }

  export interface SearchQuery {
    areaId?: string
    deptId?: string
    username?: string
    nickname?: string
    phone?: string
    roles?: string[]
    groups?: number
    type?: string
  }
  export interface Record {
    id: string
    createTime: string
    createBy: string
    updateTime: string
    updateBy: string
    username: string
    lockFlag: string
    nickname: string
    phone: string
    avatar: string
    deptId: string
    areaId: string
    email: string
    type: string
  }
  export interface Form {
    id: string
    username: string
    lockFlag: string
    nickname: string
    phone: string
    avatar: string
    deptId: string
    areaId: string
    email: string
    groupIds: string[]
    password: string
    roleId: string
    type: string
  }
  export interface ResStatus {
    userLabel: string
    userValue: number
  }
  export interface ResGender {
    genderLabel: string
    genderValue: number
  }
  export interface ResDepartment {
    id: string
    name: string
    children?: ResDepartment[]
  }
  export interface ResRole {
    id: string
    name: string
    children?: ResDepartment[]
  }

  export interface PasswordForm {
    password: string
    newPassword: string
  }
}
